package com.tjrac.generalpermissions.service;

import com.tjrac.generalpermissions.domain.Permission;
import com.tjrac.generalpermissions.epception.MsgException;

import java.util.List;

/**
 * @author ZeNing
 * @create 2020-11-29 15:20
 */
public interface PermissionService {

    /**
     * 查询单个权限
     */
    Permission queryById(int id) throws MsgException;

    /**
     * 查看所有权限
     */
    String queryAllPermission() throws MsgException;

    /**
     * 添加权限
     * @param permission 要添加的权限
     */
    String addPermission(Permission permission) throws MsgException;

    /**
     * 删除权限
     * @param id 要删除的权限id
     */
    String delPermission(int id) throws MsgException;

    /**
     * 修改权限
     */
    String modifyPermission(Permission permission) throws MsgException;

}
